import React from 'react'
import { Link, Control } from 'react-keeper'
import 'weui';
import fangzi from './../../assets/icon/房子.png';
import { ButtonArea,Panel,PanelHeader,PanelBody,Page,
  Button,
  CellsTitle,
  CellsTips,
  Cell,
  CellHeader,
  CellBody,
  CellFooter,
  Form,
  FormCell,
  Icon,
  Input,
  Label,
  TextArea,
  Switch,
  Radio,
  Checkbox,
  Select,
  VCode,Flex,
  FlexItem,
  MediaBox,
  MediaBoxHeader,
  MediaBoxBody,
  MediaBoxTitle,
  MediaBoxDescription,
  MediaBoxInfo,
  MediaBoxInfoMeta,
  Preview, PreviewHeader, PreviewFooter, PreviewBody, PreviewItem, PreviewButton,
  Agreement,
  Toptips
} from  'react-weui/build/packages';
const appMsgIcon = <img
  src=""/>



export default class EngInfoView extends React.Component {

  constructor(props) {
    super(props);
    this.state = {
    }
    this.mypreview = this.mypreview.bind(this);
  }

  mypreview() {
   // Control.go('/mypreview');
    Control.go('/myinfo/galleryview',this.props.imgls);
  }


  render() {
    return (
      <Panel className="head-panel">
        <PanelHeader>
          <div className="title-bg"/>
          {this.props.eng.engName}
        </PanelHeader>

        <MediaBoxBody>
          <Cell>
            <CellHeader>
              <PreviewItem label="工程类型" />
            </CellHeader>
            <CellBody>

              <p style={{font: '13px', marginRight: '10px'}}>房建工程 </p>
            </CellBody>
          </Cell>

          <Cell>
            <CellHeader>
              <PreviewItem label="工程地址" />
            </CellHeader>
            <CellBody>
              <p style={{font: '13px', marginRight: '10px'}}>{this.props.eng.engAddress}</p>

            </CellBody>
          </Cell>


          <Cell>
            <CellHeader>
              <PreviewItem label="报监日期" />
            </CellHeader>
            <CellBody>
              <p style={{font: '13px', marginRight: '10px'}}>{ new Date(this.props.eng.bjTime).toLocaleString() }</p>
            </CellBody>
          </Cell>

          <Cell>
            <CellHeader>
              <PreviewItem label="建设单位" />
            </CellHeader>
            <CellBody>
              <p style={{font: '13px', marginRight: '10px'}}>{this.props.eng.Jsdw} </p>
            </CellBody>
          </Cell>
          <Cell>
            <CellHeader>
              <PreviewItem label="施工单位" />
            </CellHeader>
            <CellBody>
              <p style={{font: '13px', marginRight: '10px'}}>{this.props.eng.engSgdw} </p>
            </CellBody>
          </Cell>
          <Cell>
            <CellHeader>
              <PreviewItem label="监理单位" />
            </CellHeader>
            <CellBody>
              <p style={{font: '13px', marginRight: '10px'}}>{this.props.eng.engJldw} </p>
            </CellBody>
          </Cell>
          <Cell>
            <CellHeader>
              <PreviewItem label="勘察单位" />
            </CellHeader>
            <CellBody>
              <p style={{font: '13px', marginRight: '10px'}}>{this.props.eng.engKcdw} </p>
            </CellBody>
          </Cell>
          <Cell>
            <CellHeader>
              <PreviewItem label="设计单位" />
            </CellHeader>
            <CellBody>
              <p style={{font: '13px', marginRight: '10px'}}>{this.props.eng.engSjdw} </p>
            </CellBody>
          </Cell>
          <CellFooter access link onClick={this.mypreview}  style={{position: 'relative', marginRight: '10px'}}>
            <Button>图片</Button>
          </CellFooter>

        </MediaBoxBody>


      </Panel>

    )
  }
}

EngInfoView.propTypes = {
  eng: React.PropTypes.object.isRequired,
  imgls: React.PropTypes.object.isRequired
}

